#ifndef _ESTDATOS_H
#define _ESTDATOS_H

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#include "fileSystem.h"


#define SET_BIT_ON 1
#define SET_BIT_OFF 0


typedef struct tDirEntry{

    uint8_t name[14];
    uint8_t fileAttributes;
    uint32_t startFileCluster;
    uint32_t fileSize;
    uint32_t posRelClusterDataRegion;
}tDirEntry;

typedef struct lstDirTable *ptrLstDirTable;

typedef struct lstDirTable{

	tDirEntry info;
	ptrLstDirTable sgte;
}lstDirTable;



int copyBufToFATeInicBMP( uint32_t **FATPart, uint32_t numNodo);/*Test OK*/
uint32_t getFreeClusters( void);
uint32_t *getXFreeClusters( uint32_t cantClusters);
void addFreeClusterChain( uint32_t fstCluster);
void rmFreeClusterChain( uint32_t **fstCluster, uint32_t cantClusters);
void crearListaDirTable( lstDirTable **lista);
void insertaPrimeroDirTable( lstDirTable **lista, tDirEntry valor);
void insertaDelanteDirTable( lstDirTable **lista, tDirEntry valor);
void insertaNodoDirTable( lstDirTable **lista, tDirEntry valor);
void suprimeNodoDirTable( lstDirTable **lista, tDirEntry *valor);

#endif
